package com.lei.app.entity.socket.room;

import com.lei.app.entity.base.BaseEntity;
import lombok.Data;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;

import java.sql.Timestamp;

/**
 * @author 郑兴泉 956607644@qq.com
 * @data 2020/4/9
 * 描述：
 */
@Data
@Table("web_socket_message")
@Comment("用户人员消息")
public class SocketRoomUserMessage extends BaseEntity {

    @Name
    @PrevInsert(uu32 = true)
    @ColDefine(width = 32, notNull = true)
    @Comment("主键")
    private String uuid;

    @Column
    @ColDefine(width = 50)
    @Comment("房间ID")
    private String roomId;

    @Column
    @ColDefine(width = 50)
    @Comment("人员消息ID")
    private String userId;

    @Column
    @ColDefine(width = 50)
    @Comment("接受人员ID")
    private String toFrom;


    @Column
    @ColDefine(type = ColType.TEXT)
    @Comment("简介")
    private String content;

    @Column
    @ColDefine(type = ColType.BOOLEAN)
    @Comment("是否撤回")
    @Default("0")
    private Boolean recallState;

    @Column
    @Comment("最后一次登录时间")
    private Timestamp lastVisitTime;

}
